package com.ruoyi.voucher.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.voucher.mapper.SubjectTypeMapper;
import com.ruoyi.voucher.domain.SubjectType;
import com.ruoyi.voucher.service.ISubjectTypeService;

/**
 * 科目分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-25
 */
@Service
public class SubjectTypeServiceImpl implements ISubjectTypeService 
{
    @Autowired
    private SubjectTypeMapper subjectTypeMapper;

    /**
     * 查询科目分类
     * 
     * @param typeId 科目分类主键
     * @return 科目分类
     */
    @Override
    public SubjectType selectSubjectTypeByTypeId(Long typeId)
    {
        return subjectTypeMapper.selectSubjectTypeByTypeId(typeId);
    }

    /**
     * 查询科目分类列表
     * 
     * @param subjectType 科目分类
     * @return 科目分类
     */
    @Override
    public List<SubjectType> selectSubjectTypeList(SubjectType subjectType)
    {
        return subjectTypeMapper.selectSubjectTypeList(subjectType);
    }

    /**
     * 新增科目分类
     * 
     * @param subjectType 科目分类
     * @return 结果
     */
    @Override
    public int insertSubjectType(SubjectType subjectType)
    {
        return subjectTypeMapper.insertSubjectType(subjectType);
    }

    /**
     * 修改科目分类
     * 
     * @param subjectType 科目分类
     * @return 结果
     */
    @Override
    public int updateSubjectType(SubjectType subjectType)
    {
        return subjectTypeMapper.updateSubjectType(subjectType);
    }

    /**
     * 批量删除科目分类
     * 
     * @param typeIds 需要删除的科目分类主键
     * @return 结果
     */
    @Override
    public int deleteSubjectTypeByTypeIds(Long[] typeIds)
    {
        return subjectTypeMapper.deleteSubjectTypeByTypeIds(typeIds);
    }

    /**
     * 删除科目分类信息
     * 
     * @param typeId 科目分类主键
     * @return 结果
     */
    @Override
    public int deleteSubjectTypeByTypeId(Long typeId)
    {
        return subjectTypeMapper.deleteSubjectTypeByTypeId(typeId);
    }
}
